package com.excellence.service.impl;

import com.excellence.pojo.Manager;
import com.excellence.mapper.ManagerMapper;
import com.excellence.service.ManagerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * (Manager)表服务实现类
 *
 * @author 徐瑞琪
 * @since 2024-04-13 14:34:05
 */
@Service("managerService")
public class ManagerServiceImpl implements ManagerService {

    @Autowired
    private ManagerMapper managerMapper;

    /**
     * 通过ID查询单条数据
     *
     * @param manager 对象实例
     * @return 实例对象
     */
    @Override
    public Manager selectById(Manager manager) {
        return managerMapper.selectById(manager);
    }

    /**
     * 修改数据
     *
     * @param manager 实例对象
     * @return 实例对象
     */
    @Override
    public Manager update(Manager manager) {
        managerMapper.update(manager);
        return selectById(manager);
    }
}
